package ooday04;
import javax.print.DocFlavor;
import java.util.Timer;
import java.util.TimerTask;
public class TimeDemo1 {
    public static void main(String[] args) {
        Timer timer = new Timer();
        int interval = 1000;
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("该写代码了！！！...");
            }
        }, interval,interval);
    }
    /*

        Timer timer = new Timer();
        int interval = 1000;
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("改写代码了！！！...");
            }
        }, interval,interval);

     */




    }



